const express = require('express')
const app =express()
app.get('/user',(req,res)=>{
    res.send("hello")
})

//获取url携带的查询参数
app.get('/',(req,res)=>{
    console.log(req.query);
    res.send(req.query)
})

// 获取url中的动态参数
app.get('/user/:id/:name',(req,res)=>{
    console.log(req.params);
    res.send(req.params)
})


app.listen(80,()=>{
    console.log("express server run at http://127.0.0.1:80");
})